#-----------------------------------------------------------------------------
# Name:        Makefile
# Purpose:     
#
# Author:      Seiji Morikami
#
# Created:     2005/13/02
# Copyright:   (c) 2005
# Licence:     See stegppm.license.txt
#-----------------------------------------------------------------------------

EXE_NAME = stegppm.exe
SOURCES = *.cpp

WARNINGS = -Wall -W -Wfloat-equal -Wshadow -Wpointer-arith -Wcast-qual \
	-Wcast-align -Wwrite-strings -Wconversion -fno-nonansi-builtins \
	-Wold-style-cast -Woverloaded-virtual

OPTIMIZATIONS = -s -O3 -fomit-frame-pointer -fsched-spec-load \
	-fmove-all-movables -ffast-math -funroll-loops \
	-fprefetch-loop-arrays -mcpu=pentium4 -minline-all-stringops \
	-maccumulate-outgoing-args

.PHONY: all clean

all:
	@$(CXX) $(WARNINGS) $(OPTIMIZATIONS) $(SOURCES) -lz -o $(EXE_NAME)
	@upx -qqq --best $(EXE_NAME)
dev:
	@$(CXX) $(WARNINGS) $(SOURCES) -lz -o $(EXE_NAME)
clean:
	@$(RM) $(EXE_NAME)
